﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace HomeBuyerTools.Views.HomeRentOrBuy
{
    public partial class Result : PhoneApplicationPage
    {
        public Result()
        {
            InitializeComponent();
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            string ari = "";
            string mtr = "";
            string eaa = "";
            string dp = "";
            string ecc = "";
            string epp = "";
            string mr = "";
            string raip = "";
            string air = "";
            string tom = "";
            string pt = "";
            string hi = "";
            string m = "";
            string annualrent = "";
            string mortgageloanamt = "";
            NavigationContext.QueryString.TryGetValue("ari", out ari);
            NavigationContext.QueryString.TryGetValue("mtr", out mtr);
            NavigationContext.QueryString.TryGetValue("eaa", out eaa);
            NavigationContext.QueryString.TryGetValue("dp", out dp);
            NavigationContext.QueryString.TryGetValue("ecc", out ecc);
            NavigationContext.QueryString.TryGetValue("epp", out epp);
            NavigationContext.QueryString.TryGetValue("mr", out mr);
            NavigationContext.QueryString.TryGetValue("raip", out raip);
            NavigationContext.QueryString.TryGetValue("air", out air);
            NavigationContext.QueryString.TryGetValue("tom", out tom);
            NavigationContext.QueryString.TryGetValue("pt", out pt);
            NavigationContext.QueryString.TryGetValue("hi", out hi);
            NavigationContext.QueryString.TryGetValue("m", out m);
            NavigationContext.QueryString.TryGetValue("annualrent", out annualrent);
            NavigationContext.QueryString.TryGetValue("mortgageloanamt", out mortgageloanamt);
            double totalannual = Convert.ToDouble(raip) + Convert.ToDouble(annualrent);
            txtTotalAnnualCostOfRenting.Text = Convert.ToDouble( totalannual).ToString();
            txtAnnualRent.Text = annualrent;
            txtMortgageLoanAmount.Text = mortgageloanamt;
            
        }

        private void imgTitle_MouseEnter(object sender, MouseEventArgs e)
        {

        }

    }
}